package com.trkj.dao.jpa;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.CcWard;

public interface CcWardDAO extends CrudRepository<CcWard, Long> {
	@Query("select c from CcWard c where c.hremarks='未住满'")
	public List<CcWard> findByHremarks(Pageable pageable);
	@Query("select count(*) from CcWard c where c.hremarks='未住满'")
	public long findBycount();
	@Query("select c from CcWard c ")
	public List<CcWard> findAll(Pageable pageable);
	@Query("select c from CcWard c where c.wname like %?1%")
	public List<CcWard> findByWname(String wname);
	@Query("select c from CcWard c where c.wofficesId=?1")
	public List<CcWard> findByWofficesId(BigDecimal wofficesId);
	@Query("select c from CcWard c where c.wgenreid=?1")
	public List<CcWard> findByWgenreid(BigDecimal wgenreid);
}
